Called when user changes the order of records.

<div class="definition">
    onReorderRow = function(event)
</div>

You can add event listener during the object creation:

<textarea class="javascript">
let grid = new w2grid({
    name: 'grid',
    show: {
        footer: true,
        orderColumn: true,
    },
    reorderRows: true,
    columns: [
        { field: 'recid', text: 'ID', size: '50px', resizable: true, sortable: true },
        { field: 'fname', text: 'Full Name', size: '200px', resizable: true },
        { field: 'lname', text: 'Last Name', size: '100%', resizable: true },
        { field: 'email', text: 'Email', size: '100%', resizable: true }
    ],
    records: [
        { recid: 1, fname: 'John', lname: 'Doe', email: 'john@gmail.com', sdate: '1/3/2012' },
        { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'stuart@gmail.com', sdate: '4/13/2012' },
        { recid: 3, fname: 'Jin', lname: 'Franson', email: 'jin@gmail.com', sdate: '3/3/2012' },
        { recid: 4, fname: 'Susan', lname: 'Ottie', email: 'susan@gmail.com', sdate: '5/3/2012' },
        { recid: 5, fname: 'Kelly', lname: 'Silver', email: 'kelly@gmail.com', sdate: '8/19/2012' },
        { recid: 6, fname: 'Francis', lname: 'Gatos', email: 'francis@gmail.com', sdate: '6/12/2012' },
        { recid: 7, fname: 'Mark', lname: 'Welldo', email: 'mark@gmail.com', sdate: '8/13/2012' },
        { recid: 8, fname: 'Thomas', lname: 'Bahh', email: 'thomas@gmail.com', sdate: '4/31/2012' },
    ],
    onReorderRow(event) {
        console.log(`Record ${event.recid} moved before ${event.moveBefore || event.moveAfter}`)
    }
})
</textarea>

or after the object has been created:

<textarea class="javascript">
w2ui.grid.on('reorderRow', function(event) {
    console.log(event);
});
</textarea>

The event handler is called before the default action of the event is triggered. You can cancel the default action by calling
<span class="method">event.preventDefault()</span>. To perform an action
after the event is fully processed, define <span class="method">event.onComplete</span> function.
<div style="height: 10px;"></div>
See <a href="utils/events">events</a> page in utilities for more details.